//
//  OnlineEyeViewController.m
//  Globalstone
//
//  Created by 刘建峰 on 16/7/20.
//  Copyright © 2016年 yuf. All rights reserved.
//

#import "OnlineEyeViewController.h"
#import "OnlineEyeTableViewCell.h"
static NSString * cellIndentifier = @"OnlineEyeTableViewCell";
@interface OnlineEyeViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UIView *navView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation OnlineEyeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initViewLayout];
    // Do any additional setup after loading the view.
}

- (void)initViewLayout{
    [self adaptiveViewLayout:self.view];
    [self adaptiveViewLayout:self.navView];
    
    [_tableView registerNib:[UINib nibWithNibName:cellIndentifier bundle:nil] forCellReuseIdentifier:cellIndentifier];
    _tableView.dataSource = self;
    _tableView.delegate = self;

}

- (IBAction)back:(id)sender {
    [self backBtn];
}

#pragma mark  ==== tableViewDelegate

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 4;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 45*VerticalRatio();
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    OnlineEyeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIndentifier];
    if (cell == nil) {
        cell = [[OnlineEyeTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentifier];
    }
    
    
    
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    UIStoryboard * storyBoard = [UIStoryboard storyboardWithName:@"PersonalStoryboard" bundle:nil];
    //    UIViewController * page = [storyBoard instantiateViewControllerWithIdentifier:@"MyLoanAttestDetail"];
    UIViewController * page = [storyBoard instantiateViewControllerWithIdentifier:@"LoanAttestDetail"];
    [[Common getNavigation]pushViewController:page];
    //
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
